// 导入共享库中的HTTP客户端
import { createHttpClient, getApiBaseUrl, type HttpResponse } from '@vue-turbo-stack/shared';

// 创建HTTP客户端实例
export const http = createHttpClient({
  baseURL: getApiBaseUrl(),
  headers: {
    'Content-Type': 'application/json',
  },
  timeout: 10000,
  retries: 3
});

// 导出类型，保持向后兼容
export type ApiResponse<T = any> = HttpResponse<T>;
